ADDON_NAME 	= "utilfoo"
ADDON_REALNAME = "SF-Lister" -- ToDo: Choose Srsname
ADDON_FOUNDER = "twitch.tv/EinObstsalat" -- ToDo: Choose Srsname
ADDON_VERSION = 31
CLIENT_NAME = GetUnitName("player",false)
CLIENT_FACTION = UnitFactionGroup("player")
MAXCOMBOPOINTS = 5
DEBUG = true

ADDON_COMMAND_SHOWDUELL = "showduel"

ADDON_DUELL_WINS = CLIENT_NAME.."'s wins: %i"
ADDON_DUELL_LOSE = CLIENT_NAME.."'s lose: %i"
ADDON_DUELL_FLED = CLIENT_NAME.."'s fled-times: %i"
ADDON_DUELL_SAVE_MAX = 10

POWER_COLOR = {
	["MANA"]    = {0,0,1};
	["ENERGY"]  = {0.74,0.74,0};
	["RAGE"]    = {1,0,0};
	["FOCUS"]   = {0.4,0.4,0};
}

CLASS_COLOR = {
	["DEATHKNIGHT"]  	=	{0.77,0.12,0.23},
	["DRUID"] 	 		=	{1.00,0.49,0.04},
	["HUNTER"]  		=	{0.67,0.83,0.45},
	["MAGE"]  			=	{0.41,0.80,0.94},
	["MONK"]  			=	{0.33,0.54,0.52},
	["PALADIN"]  		=	{0.96,0.55,0.73},
	["PRIEST"] 			=	{1.00,1.00,1.00},
	["ROGUE"] 	 		=	{1.00,0.96,0.41},
	["SHAMAN"]  		=	{0.00,0.44,0.87},
	["WARLOCK"]  		=	{0.58,0.51,0.79},
	["WARRIOR"]  		=	{0.78,0.61,0.43},
}

CLASS_ROLE_COORD = {
	[3] = {0.25,0.5,0,1},
	[2] = {0.5,0.75,0,1},
	[1] = {0.75,1,0,1},
	[4] = {0,1,0,1},
}

CLASS_SPECS = {}

for id = 1, GetNumClasses() do
	local _, tag = GetClassInfoByID(id)
	CLASS_SPECS[tag] = {}
	for i = 1, GetNumSpecializationsForClassID(id) do
		local specID, specName, _, specIcon = GetSpecializationInfoForClassID(id, i)
		local role = GetSpecializationRoleByID(specID)
		if role == "DAMAGER" then
			CLASS_SPECS[tag][specName] = { ROLE = 3, ICON = specIcon, SPECNAME = specName }
		elseif role == "HEALER" then
			CLASS_SPECS[tag][specName] = { ROLE = 1, ICON = specIcon, SPECNAME = specName }
		elseif role == "TANK" then
			CLASS_SPECS[tag][specName] = { ROLE = 2, ICON = specIcon, SPECNAME = specName }
		else
			CLASS_SPECS[tag][specName] = { ROLE = 4, ICON = {1,1,1,1} , SPECNAME = "UNKNOWN" }
		end
	end
end

--[[
##################################
######## RBG - Constants #########
##################################
]]

RBG = {
	HEIGHT = 350,
	WIDTH  = 200,
	ADD_DIV = 6,
	VALIDUNITS = {},
	FRAMENAME = "RatedBattleground_MainFrame",
	SETTINGS = {
		["Warsong Gulch"] = { MAXPLAYERS = 10, TYPE = "CTF" },
		["Arathi Basin"]  = { MAXPLAYERS = 15, TYPE = "DOMINATION" },
		["Eye of the Storm"]  = { MAXPLAYERS = 15, TYPE = "DOMINATION" },
		["Alterac Valley"]  = { MAXPLAYERS = 40, TYPE = "RAID" },
		["The Battle for Gilneas"]  = { MAXPLAYERS = 10, TYPE = "DOMINATION" },
		["Twin Peaks"]  = { MAXPLAYERS = 10, TYPE = "CTF" },
		["Silvershard Mines"]  = { MAXPLAYERS = 10, TYPE = "PAYLOAD" },
		["Temple of Kotmogu"]  = { MAXPLAYERS = 10, TYPE = "ORB" },
		["Deepwind Gorge"]  = { MAXPLAYERS = 15, TYPE = "DOMINATION" },
		["Strand of the Ancients"]  = { MAXPLAYERS = 15, TYPE = "SIEGE" },
		["Isle of Conquest"]  = { MAXPLAYERS = 40, TYPE = "RAID" },
	},
}